package com.geo.geoProject.client.tousLesProgrammes.remoteMap;

import com.geo.geoProject.client.application.IPCMessage;
import com.geo.geoProject.client.application.ListeDesApplications;
import com.geo.geoProject.client.application.MessageInterProgramme;
import com.geo.geoProject.client.tousLesProgrammes.carte2d.Carte2d;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.Label;

public class RemoteMapFrame extends VerticalPanel {
	public RemoteMapFrame() {
		setSize("100%", "100%");
		setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		
		AbsolutePanel absolutePanel = new AbsolutePanel();
		add(absolutePanel);
		absolutePanel.setSize("414px", "246px");
		
		Button btnHaut = new Button("Haut");
		btnHaut.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				MessageInterProgramme m = new MessageInterProgramme() ;
				m.idRreceiver = ListeDesApplications.Profil ;
				IPCMessage.get().transmettre(m) ;
			}
		});
		absolutePanel.add(btnHaut, 160, 10);
		btnHaut.setSize("96px", "45px");
		
		Button button = new Button("Haut");
		button.setText("Bas");
		absolutePanel.add(button, 160, 100);
		button.setSize("100px", "45px");
		
		Button button_1 = new Button("Haut");
		button_1.setText("Gauche");
		absolutePanel.add(button_1, 63, 53);
		button_1.setSize("100px", "45px");
		
		Button button_2 = new Button("Haut");
		button_2.setText("Droite");
		absolutePanel.add(button_2, 255, 53);
		button_2.setSize("100px", "45px");
		
		Button button_3 = new Button("+");
		button_3.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				MessageInterProgramme m = new MessageInterProgramme() ;
				m.idRreceiver = ListeDesApplications.Carte2d ;
				m.idMsgType   = Carte2d.MSG_TYPE_ZOOMPLUS ;
				IPCMessage.get().transmettre(m) ;
			}
		});
		absolutePanel.add(button_3, 309, 134);
		button_3.setSize("46px", "45px");
		
		Button button_4 = new Button("+");
		button_4.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				MessageInterProgramme m = new MessageInterProgramme() ;
				m.idRreceiver = ListeDesApplications.Carte2d ;
				m.idMsgType   = Carte2d.MSG_TYPE_ZOOMMOINS ;
				IPCMessage.get().transmettre(m) ;
			}
		});
		button_4.setText("-");
		absolutePanel.add(button_4, 309, 185);
		button_4.setSize("46px", "45px");
		
		Label lblControle = new Label("Controle");
		lblControle.setStyleName("titre");
		absolutePanel.add(lblControle, 62, 174);
		lblControle.setSize("123px", "36px");
	}
}
